{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "aae8a764",
   "metadata": {},
   "source": [
    "# Deploy FastKafka docs to GitHub Pages"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "665f266f",
   "metadata": {},
   "source": [
    "## Getting started"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c5a70f46",
   "metadata": {},
   "source": [
    "Add your workflow file `.github/workflows/fastkafka_docs_deploy.yml` and push it to your remote default branch.\n",
    "\n",
    "Here is an example workflow:\n",
    "\n",
    "```yaml\n",
    "name: Deploy FastKafka Generated Documentation to GitHub Pages\n",
    "\n",
    "on:\n",
    "  push:\n",
    "    branches: [ \"main\", \"master\" ]\n",
    "  workflow_dispatch:\n",
    "\n",
    "jobs:\n",
    "  deploy:\n",
    "    runs-on: ubuntu-latest\n",
    "    permissions:\n",
    "      contents: write\n",
    "    steps:\n",
    "      - uses: airtai/workflows/fastkafka-ghp@main\n",
    "        with:\n",
    "          app: \"test_fastkafka.application:kafka_app\"\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b29b85be",
   "metadata": {},
   "source": [
    "## Options"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f5d2cf03",
   "metadata": {},
   "source": [
    "\n",
    "\n",
    "### Set app location\n",
    "\n",
    "Input in the form of `path:app`, where `path` is the path to a Python file and `app` is an object of type `FastKafka`:\n",
    "\n",
    "```yaml\n",
    "- name: Deploy\n",
    "  uses: airtai/workflows/fastkafka-ghp@main\n",
    "  with:\n",
    "    app: \"test_fastkafka.application:kafka_app\"\n",
    "```\n",
    "\n",
    "In the above example, `FastKafka` app is named as `kafka_app` and it is available in the `application` submodule of the `test_fastkafka` module."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "67a09999",
   "metadata": {},
   "source": [
    "## Example Repository\n",
    "\n",
    "A `FastKafka`-based library that uses the above-mentioned workfow actions to publish FastKafka docs to `Github Pages` can be found [here](https://github.com/airtai/sample_fastkafka_project/blob/main/.github/workflows/fastkafka_deploy.yaml)."
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "python3",
   "language": "python",
   "name": "python3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
